package com.eusun.design.singleton;

public class User {
    private User() {
    }

    enum SingletonEnum {
        INSTANCE;
        private final User user;

        SingletonEnum() {
            user = new User();
        }

        public User getInstance() {
            return user;
        }
    }

    public static User getInstance() {
        return SingletonEnum.INSTANCE.getInstance();
    }
}